package com.robusta.cityuate.base;

import java.util.ArrayList;

//import android.content.Context;
import android.graphics.drawable.Drawable;

import com.google.android.maps.MapView;
import com.google.android.maps.OverlayItem;

import com.readystatesoftware.mapviewballoons.BalloonItemizedOverlay;
//A class for the map bubble drawable.
public class CityuateItemizedOverlay extends BalloonItemizedOverlay<OverlayItem> {

	private ArrayList<OverlayItem> m_overlays = new ArrayList<OverlayItem>();
//	private Context c;
	
	public CityuateItemizedOverlay(Drawable defaultMarker, MapView mapView) {
		super(boundCenter(defaultMarker), mapView);
		//c = mapView.getContext();
		   populate();
	}

	public void addOverlay(OverlayItem overlay) {
	    m_overlays.add(overlay);
	    populate();
	}

	@Override
	protected OverlayItem createItem(int i) {
		return m_overlays.get(i);
	}

	@Override
	public int size() {
		return m_overlays.size();
	}
	
	public void removeAll(){
		 m_overlays.clear();
		 populate();
	}
	
	public void hideAll(){
		hideAllBalloons();
	}
	
	
	
}
